package cn.edu.thu.tsquality.core.common.common;

/**
 * Created by wangyihan  on 2018/4/10 上午10:30.
 * E-mail address is yihanwang22@163.com.
 * Copyright © 2017 wangyihan. All Rights Reserved.
 *
 * @author wangyihan
 */
public enum DataSourceType {
  CSV(0), IOTDB(1);

  private int value;

  DataSourceType(int value) {
    this.value = value;
  }

  public int getValue() {
    return this.value;
  }

  public static DataSourceType fromString(String type) {
    switch (type.toLowerCase()) {
      case "csv":
        return DataSourceType.CSV;
      case "iotdb":
        return DataSourceType.IOTDB;
    }
    return DataSourceType.CSV;
  }
}
